<html>
<head><meta charset="utf-8"><title>Using a local copy of `hashbrown` · t-libs · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/index.html">t-libs</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20a.20local.20copy.20of.20.60hashbrown.60.html">Using a local copy of `hashbrown`</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="206219466"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20a%20local%20copy%20of%20%60hashbrown%60/near/206219466" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> njn <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20a.20local.20copy.20of.20.60hashbrown.60.html#206219466">(Aug 07 2020 at 02:49)</a>:</h4>
<p>I want to experiment with some changes to <code>hashbrown</code>, see the effect on compile times.</p>



<a name="206219475"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20a%20local%20copy%20of%20%60hashbrown%60/near/206219475" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> njn <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20a.20local.20copy.20of.20.60hashbrown.60.html#206219475">(Aug 07 2020 at 02:49)</a>:</h4>
<p>I tried changing <a href="https://github.com/rust-lang/rust/blob/71f8d0c8f1060bbe74100f29cc6f2da63d697c28/library/std/Cargo.toml#L23">this entry</a> so the <code>version</code> is instead a <code>path</code>, but I'm getting various errors</p>



<a name="206219522"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20a%20local%20copy%20of%20%60hashbrown%60/near/206219522" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> njn <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20a.20local.20copy.20of.20.60hashbrown.60.html#206219522">(Aug 07 2020 at 02:50)</a>:</h4>
<p>At first, my local copy of <code>hashbrown</code> was in a directory next to my rustc checkout, and I got some kind of bootstrap error relating to the crate not being found.</p>



<a name="206219526"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20a%20local%20copy%20of%20%60hashbrown%60/near/206219526" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> njn <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20a.20local.20copy.20of.20.60hashbrown.60.html#206219526">(Aug 07 2020 at 02:50)</a>:</h4>
<p>So I moved the <code>hashbrown</code> directory into my rustc repo, and now I'm getting a different error:</p>



<a name="206219542"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20a%20local%20copy%20of%20%60hashbrown%60/near/206219542" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> njn <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20a.20local.20copy.20of.20.60hashbrown.60.html#206219542">(Aug 07 2020 at 02:51)</a>:</h4>
<div class="codehilite"><pre><span></span><code>error: failed to select a version for `rustc-hash`.
    ... required by package `hashbrown v0.8.1 (/home/njn/moz/rust1/hashbrown-orig)`
    ... which is depended on by `std v0.0.0 (/home/njn/moz/rust1/library/std)`
    ... which is depended on by `proc_macro v0.0.0 (/home/njn/moz/rust1/library/proc_macro)`
    ... which is depended on by `test v0.0.0 (/home/njn/moz/rust1/library/test)`
versions that meet the requirements `=1.0` are: 1.0.1, 1.0.0
</code></pre></div>



<a name="206219747"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20a%20local%20copy%20of%20%60hashbrown%60/near/206219747" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> njn <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20a.20local.20copy.20of.20.60hashbrown.60.html#206219747">(Aug 07 2020 at 02:56)</a>:</h4>
<p>Ok, removing the <code>=</code> from this line in hashbrown's <code>Cargo.toml</code> fixes it:</p>
<div class="codehilite"><pre><span></span><code>rustc-hash = &quot;=1.0&quot;
</code></pre></div>



<a name="206219770"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20a%20local%20copy%20of%20%60hashbrown%60/near/206219770" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> njn <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20a.20local.20copy.20of.20.60hashbrown.60.html#206219770">(Aug 07 2020 at 02:57)</a>:</h4>
<p>Hmm, now I get "failed to resolve: could not find <code>CollectionAllocErr</code> in <code>hashbrown</code>"</p>



<a name="206220009"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20a%20local%20copy%20of%20%60hashbrown%60/near/206220009" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> njn <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20a.20local.20copy.20of.20.60hashbrown.60.html#206220009">(Aug 07 2020 at 03:03)</a>:</h4>
<p>rustc uses 0.6.2, current version is 0.8.1, I guess there are some API incompatibilities</p>



<a name="206220011"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20a%20local%20copy%20of%20%60hashbrown%60/near/206220011" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> njn <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20a.20local.20copy.20of.20.60hashbrown.60.html#206220011">(Aug 07 2020 at 03:03)</a>:</h4>
<p>/me patches over them, hackily</p>



<a name="206221955"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20a%20local%20copy%20of%20%60hashbrown%60/near/206221955" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20a.20local.20copy.20of.20.60hashbrown.60.html#206221955">(Aug 07 2020 at 03:56)</a>:</h4>
<p>There a PR updating hashbrown, if it helps you to check that out</p>



<a name="206221964"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20a%20local%20copy%20of%20%60hashbrown%60/near/206221964" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20a.20local.20copy.20of.20.60hashbrown.60.html#206221964">(Aug 07 2020 at 03:57)</a>:</h4>
<p>Only holdup is some Windows debug stuff, AFAIK</p>



<a name="206226556"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20a%20local%20copy%20of%20%60hashbrown%60/near/206226556" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20a.20local.20copy.20of.20.60hashbrown.60.html#206226556">(Aug 07 2020 at 06:01)</a>:</h4>
<p>Actually the Windows debug stuff is fixed and I need to update that PR...</p>



<a name="206227364"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20a%20local%20copy%20of%20%60hashbrown%60/near/206227364" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20a.20local.20copy.20of.20.60hashbrown.60.html#206227364">(Aug 07 2020 at 06:21)</a>:</h4>
<p>@njn Incidentally here's something that I tried in the past but never got around to measuring the perf impact of: <a href="https://gist.github.com/Amanieu/f877a6db82fe7b80d01a3412af9e9cbc">https://gist.github.com/Amanieu/f877a6db82fe7b80d01a3412af9e9cbc</a></p>



<a name="206306091"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20a%20local%20copy%20of%20%60hashbrown%60/near/206306091" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20a.20local.20copy.20of.20.60hashbrown.60.html#206306091">(Aug 07 2020 at 20:34)</a>:</h4>
<p>ooh, it merged, hooray!</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>